package com.ruan.controller;

import com.ruan.pojo.Dept;
import com.ruan.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:DeptController
 * @Author:阮昇
 * @Description:
 * @Datetime: 2023/6/14 18:53
 **/
@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    @RequestMapping("/getDeptById/{id}")
    public Dept getDeptById(@PathVariable Integer id){

        return deptService.getDeptById(id);

    }
}
